package wikisearch.datastructures;

import java.util.Vector;

public class PairVector extends Vector<Pair<Integer, Integer>> {

	private static final long serialVersionUID = 1L;
	public static int FIRST = 0;
	public static int SECOND = 1;
	
	public Integer get(int idx, int pair) {
		
		if (pair == FIRST && get(idx) != null)
			return get(idx).first;
		else if (pair == SECOND && get(idx) != null)
			return get(idx).second;
		else return null;
	}
	
	public void add(int first, int second) {
		
		super.add( new Pair<Integer, Integer>(new Integer(first), new Integer(second)) );
	}
}
